1. LangChain Components

There are 6 components of LangChain
Pasted image 20250604161435.png

1. Models

In LangChain, "models" are the core interfaces through which you interact with AI models.
you can use any model and code of the code doesn't change much.

there are basically two type of models

  1. Language models
  2. Embedding models
Summary

Models in Langchain is a interface which solve to make easy to commnucate with every major models.

2. Prompts

There are differents types of prompts:
Pasted image 20250604164016.png
Pasted image 20250604164201.png

3. Chains

Chains in LangChain is a function from which we make pipeline we can make from a simple sequential chain to the complex one. example Parallel chain or a conditional chain where we put conditions like user input etc.

4. Indexes

Indexes connect your application to external knowledge - such as PDFs, websites or databases.
there are mainly four types of indexes:

  1. Document Loader
  2. Text splitter
  3. Vector store
  4. Retrivers

5. Memory

we know that llm api calls are stateless and every API calls is independent
Pasted image 20250604165811.png

So langchain has a memory component to deal or remember previous memory. there are different types of memory:
Pasted image 20250604170212.png

6. Agents

Chat-bots have

  • reasoning capability
  • has access to many tools ex: calculator
  • has APIs access example weather api